<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isCookie: "",
    };
  },
  beforeMount() {
    // 获取cookie，看是否有记录
    this.isCookie = this.$_cookie.getCookie("user");
  },
  mounted() {
    if(this.isCookie){
    }else {
      this.$router.push('/');
    }
  },
  methods: {},
};
</script>
<style></style>
